package string;

import org.w3c.dom.ls.LSOutput;

public class IndexOfDemo{
    public static void main(String[] args) {
        String str ="think.in java";
        int index=str.indexOf("in");
        System.out.println(index);
        //
        index =str.indexOf("IN");
        System.out.println(index);
        //
        index=str.indexOf("in",3);
        System.out.println(index);
        //
        index=str.lastIndexOf("in");
        System.out.println(index);
    }




}
